<?php

namespace common\model;

use think\model\RelationModel;

class TenantGroupApplyModel extends RelationModel
{
    protected $_validate = [
        ['tenant_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['tenant_id', '', '', self::MUST_VALIDATE, 'integer', self::MODEL_INSERT],//必须字段
        ['tenant_group_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['tenant_group_id', '', '', self::MUST_VALIDATE, 'integer', self::MODEL_INSERT],//必须字段
        ['apply_user_id', '', '', self::MUST_VALIDATE, 'integer', self::MODEL_INSERT],//必须字段
        ['audit_user_id', '', '', self::MUST_VALIDATE, 'integer', self::MODEL_UPDATE],//必须字段
    ];

    protected $_auto = [
        ['created', 'time', self::MODEL_INSERT, 'function'],
        ['updated', 'time', self::MODEL_UPDATE, 'function'],
    ];
}